package com.zmn.oms.zmn.normal.business.interfaces.work.masterwork;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.dto.work.masterwork.CompleteDTO;
import com.zmn.oms.model.dto.work.masterwork.ContactUserDTO;
import com.zmn.oms.model.dto.work.masterwork.ServiceCompleteDIO;
import com.zmn.oms.model.dto.work.modify.amount.ZsUpdateChannelPrepayAmountDTO;
import com.zmn.oms.model.dto.work.modify.amount.ZsUpdatePriceDTO;
import com.zmn.oms.model.entity.work.OrderWork;
import com.zmn.oms.model.vo.work.modify.amount.ZsUpdateChannelPrepayAmountVO;
import com.zmn.oms.model.vo.work.modify.amount.ZsUpdatePriceVO;

/**
 * 类描述：啄木鸟-普通工单-工程师工单接口
 * @author heciqi
 * @date 2018/11/21 20:50
 */
public interface ZsNormalMasterWorkBService {

    /**
     * 查询改定金
     * @param orderId
     * @param workId
     * @return
     */
    ZsUpdatePriceVO findUpdatePriceVO(Long orderId, Long workId);

    /**
     * 改价格联动的优惠变动
     * @param updatePriceDTO
     * @return
     */
    @Deprecated
    ZsUpdatePriceVO findDiscountListUpdatePrice(ZsUpdatePriceDTO updatePriceDTO)
            throws OmsBaseException;

    /**
     * 改预付款
     * @param orderId
     * @param workId
     * @return
     */
    ZsUpdateChannelPrepayAmountVO findUpdateChannelPrepayAmountVO(Long orderId, Long workId) throws OmsBaseException;

    /**
     * 保存修改定金数据
     * @param updatePriceDTO
     */
    void saveUpdatePrice(ZsUpdatePriceDTO updatePriceDTO) throws OmsBaseException;

    /**
     * 工程师保存修改定金数据
     * @param updatePriceDTO
     */
    void saveUpdatePriceForEngineer(ZsUpdatePriceDTO updatePriceDTO) throws OmsBaseException;

    /**
     * 保存渠道支付
     *
     * @param channelPrepayAmountDTO
     * @throws Exception
     */
    void saveChannelPrepayAmountPay(ZsUpdateChannelPrepayAmountDTO channelPrepayAmountDTO) throws Exception;

    /**
     * 保存渠道预收
     * @param channelPrepayAmountDTO
     */
    void saveChannelPrepayAmount(ZsUpdateChannelPrepayAmountDTO channelPrepayAmountDTO) throws OmsBaseException;

    /**
     * 工单完成
     * @param completeDTO
     */
    void completeOrder(CompleteDTO completeDTO) throws OmsBaseException;

    /**
     * 工单完成检查
     * @param completeDTO
     */
    void checkComplete(CompleteDTO completeDTO) throws OmsBaseException;

    /**
     * 工单完成服务检查，若校验通过，返回被校验的工单对象，否则抛出OmsBaseException异常。
     * @param serviceCompleteDIO
     * @return OrderWork 被校验的工单对象
     * @throws OmsBaseException
     */
    OrderWork checkServiceComplete(ServiceCompleteDIO serviceCompleteDIO) throws OmsBaseException;

    /**
     * 记录工程师联系用户
     * @param contactUserDTO
     */
    void saveContactUser(ContactUserDTO contactUserDTO) throws Exception;
}
